
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mytools;

import com.opensymphony.xwork2.ActionSupport;

/**

 *

 * @author wl

 */
public class questiondeletemany extends ActionSupport {

    private String[] id;
    private questionDAO qd;

    public questiondeletemany() {
    }

    public String execute() throws Exception {

        setQd(new questionDAO());
        if (getId() != null) {
            for (int i = 0; i < getId().length; i++) {
                getQd().deletequestion(Integer.parseInt(getId()[i]));
            }
        }
        return SUCCESS;

    }

    /**
     * @return the id
     */
    public String[] getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(String[] id) {
        this.id = id;
    }

    /**
     * @return the qd
     */
    public questionDAO getQd() {
        return qd;
    }

    /**
     * @param qd the qd to set
     */
    public void setQd(questionDAO qd) {
        this.qd = qd;
    }
}
